package com.bzkj.basicinfo.mapper;

import com.bzkj.basicinfo.domain.wms.WmsStoStockLimitationEntity;
import com.bzkj.basicinfo.domain.wms.dto.FreezeDto;
import com.bzkj.basicinfo.domain.wms.dto.WmsStoStockDto;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
* @author wl
* @description 针对表【wms_sto_stock_limitation(出库限制表)】的数据库操作Mapper
* @createDate 2025-01-02 09:51:37
* @Entity com.bzkj.basicinfo.domain.wms.WmsStoStockLimitationEntity
*/
public interface WmsStoStockLimitationMapper {

    void updateStoStockLimitation(WmsStoStockDto entity);

    void saveStoStockLimitation(WmsStoStockLimitationEntity entity);

    void updateStoStockLimitation1(FreezeDto dto);

    List<HashMap<String,Object>> getEnableStatus0All(@Param("pkMaterial") String pkMaterial, @Param("pkBatchCode") String pkBatchCode);

    List<HashMap<String,Object>> getEnableStatusNumLimit(@Param("pkMaterial") String pkMaterial, @Param("pkBatchCode") String pkBatchCode);

    List<HashMap<String, Object>> getEnableStatus3All(@Param("pkMaterial") String pkMaterial, @Param("pkBatchCode") String pkBatchCode);

    void updateEnable(String id);

    List<HashMap<String, Object>> getSumByBillStatus(@Param("pkMaterial") String pkMaterial, @Param("pkBatchCode") String pkBatchCode);

    /**
     * 根据物料主键、批号删除数量限制的数据
     * @param pkMaterial
     * @param pkBatchCode
     */
    void deleteByPk(@Param("pkMaterial") String pkMaterial, @Param("pkBatchCode") String pkBatchCode,@Param("billStatusPk")String billStatusPk);

    void deleteById(@Param("id")String id);

    void deleteByIds(@Param("ids")List<String> ids);

    WmsStoStockLimitationEntity selectOneByPkMaterial(@Param("pkMaterial") String pkMaterial, @Param("pkBatchCode") String pkBatchCode,@Param("billStatusPk")String billStatusPk);

    List<HashMap<String, Object>> selectAllListByType(@Param("typeRestriction")Integer typeRestriction,@Param("pkMaterial") String pkMaterial, @Param("pkBatchCode") String pkBatchCode);

    WmsStoStockLimitationEntity selectOneById(@Param("id")String id);

}




